package com.sy.nlp;

import org.apache.commons.io.IOUtils;

import java.io.FileReader;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class NameUtils {
    public static List<String> names() {
        List<String> strings = null;
        try {
            strings = IOUtils.readLines(new FileReader("nr.txt"))
                    .stream()
                    .flatMap(items -> Arrays.stream(items.split(",")))
                    .collect(Collectors.toList());
        } catch (Exception e) {
            e.printStackTrace();
        }
        return strings;
    }

}
